﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
using DayPilot.Web.Ui;

namespace AnyOffice.general.meeting.apply
{
    public partial class meeting_today : ModulePage
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable table = new DataTable();
            table.Columns.Add("MeetingId", Type.GetType("System.Int32"));
            table.Columns.Add("StartTime", Type.GetType("System.DateTime"));
            table.Columns.Add("EndTime", Type.GetType("System.DateTime"));
            table.Columns.Add("Content", Type.GetType("System.String"));
            DataTable table2 = new MeetingDao().Today(base.Conn);
            if (table2.Rows.Count > 0)
            {
                string str = string.Empty;
                for (int i = 0; i < table2.Rows.Count; i++)
                {
                    str = "会议：" + table2.Rows[i]["Name"].ToString();
                    if (table2.Rows[i]["RoomName"] != DBNull.Value)
                    {
                        object obj2 = str;
                        str = string.Concat(new object[] { obj2, "（", table2.Rows[i]["RoomName"], "）" });
                    }
                    if (table2.Rows[i]["Topic"] != DBNull.Value)
                    {
                        str = str + "\n主题：" + table2.Rows[i]["Topic"].ToString();
                    }
                    table.Rows.Add(new object[] { Convert.ToInt32(table2.Rows[i]["MeetingId"].ToString()), Convert.ToDateTime(table2.Rows[i]["StartTime"].ToString()), Convert.ToDateTime(table2.Rows[i]["EndTime"].ToString()), str });
                }
            }
            this.DayPilotCalendar1.DataSource = table;
            this.DayPilotCalendar1.DataBind();
        }
 

    }
}
